/*MiniChessTeamAwesome © 2012 by Philipp Lange, Markus Stecher (MIT License)*/

public class Move {

	public Square toSquare;
	public Square fromSquare;

	/*creates a move out of 2 Squares*/
	public Move(Square fromSquare, Square toSquare){
		this.toSquare=toSquare;
		this.fromSquare=fromSquare;
	}

	/*creates a move out of a String*/
	public Move(String m){
		fromSquare = new Square(m.substring(0, 2));
		toSquare = new Square(m.substring(3, 5));
	}

	/*returns the move as a String -> a2-a3*/
	public String toString(){
		return fromSquare.toString()+"-"+toSquare.toString();
	}
	
}//endclass Move
